﻿using DataBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WebDataGet.Services
{
    public class MainService
    {
        private NlogService NlogService { get; set; }

        private WebDataGetService WebDataGetService { get; set; }
        public MainService() {
        
        
        }    

        public MainService(NlogService nlogService, WebDataGetService webDataGetService)
        {
            NlogService = nlogService;
            WebDataGetService = webDataGetService;
        }

        public async  Task Main()
        {
            NlogService.Info("主函数启动");
            
            try
            {
                //await WebDataGetService.GetData("868913052134538");
                WebDataGetService.LoopGet();

            }
            catch (Exception ex)
            {
                NlogService.Error(ex.ToString());
            }



        }
    }
}
